package com.song.service;

import com.song.model.Adress;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName : UserServiceImpl
 * @Author : 司猫子
 * @Date: 2021/2/26 14:17
 */
public class UserServiceImpl implements UserService{
    public Adress queryAddress(Integer userid) {
        System.out.println("最佳化实践,服务提供者UserService");
        Adress adress = new Adress();
        if(1 == userid){
            adress.setCity("北京");
            adress.setName("张三");
            adress.setPhone("110");
            adress.setStreet("张贵庄");
            adress.setZipcode("300300");
        }else if(2 == userid){
            adress.setCity("天津");
            adress.setName("李四");
            adress.setPhone("120");
            adress.setStreet("小东庄");
            adress.setZipcode("300400");
        }
        return adress;
    }
}
